<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-form ref="form" :model="s_search" :rules="rules" label-width="100px" id="mvcfm">
      <div class="form-unit">
        <span class="mvc-title-left"> 搜索标准文件 </span>
      </div>
      <div>
        <el-row>
          <el-col :span="24">
            <el-form-item label="文件标准名称" prop="client_filename">
              <div class="el-select">
                <el-input v-model="s_search.client_filename" />
              </div> 文件标准号 <div class="el-select">
                <el-input v-model="s_search.subject" />
              </div>
              <a href="javascript:mvc.submitURL('gotoPage('4E739024C90D42C5A61C72AA1E140C80?')')" type='primary'>{{s_search['']}}</a>
            </el-form-item>
          </el-col>
        </el-row>
      </div>
      <div class="form-unit">
        <span class="mvc-title-left"> 标准文件列表 </span>
      </div>
      <el-table :data="s_files">
        <el-table-column label="" prop="item_id" width="80">
          <template slot-scope="scope">
            <el-button @click="$parent.$parent.closeStandardDocumentBackups(scope.row['item_id'],scope.row['client_filename']);" type="success" size="mini"><i class="fa fa-edit"></i>选择</el-button>
          </template>
        </el-table-column>
        <el-table-column label="#" align="center" type='index'>
        </el-table-column>
        <el-table-column label="文件标准号" prop="subject">
        </el-table-column>
        <el-table-column label="文件名称" prop="client_filename">
        </el-table-column>
        <el-table-column label="文件类型" prop="type_desc">
        </el-table-column>
      </el-table>
      <pagination v-show="total>0" :total="total" :limit.sync="pageSize" @pagination="getPage" />
    </el-form>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'StandardDocumentBackups',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        s_search: {
          client_filename: null,
          subject: null,
        },
        s_files: [],
        loading: false,
        rules: {}
      }
    },
    created() {
      this.getData();
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/psi/supplychainmana/SupplierAction/standardDocumentBackups?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
    },
  }
</script>
